home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
prtfrm51.zip
/
FRMSRC.ZIP
/
FDEMO03.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-06-20
|
3KB
|
109 lines
unit Fdemo03;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, DBCtrls, DBTables, DB, Mask, Grids, DBGrids,
ExtCtrls, Buttons, TabNotBk, PrnWin, CB_Types;
type
TForm03 = class(TForm)
TabbedNotebook1: TTabbedNotebook;
View: TBitBtn;
Panel1: TPanel;
DBGrid1: TDBGrid;
DBEdit1: TDBEdit;
DBImage1: TDBImage;
DataSource1: TDataSource;
Table1: TTable;
Table1SpeciesNo: TFloatField;
Table1Category: TStringField;
Table1Common_Name: TStringField;
Table1SpeciesName: TStringField;
Table1Lengthcm: TFloatField;
Table1Length_In: TFloatField;
Table1Notes: TMemoField;
Table1Graphic: TGraphicField;
DBMemo1: TDBMemo;
Exit: TBitBtn;
PrintWin1: TPrintWin;
Memo1: TMemo;
Shape1: TShape;
Image1: TImage;
Both: TBitBtn;
BothBorders: TBitBtn;
Memo2: TMemo;
procedure ViewClick(Sender: TObject);
procedure ExitClick(Sender: TObject);
procedure BothClick(Sender: TObject);
procedure BothBordersClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form03: TForm03;
implementation
{$R *.DFM}
procedure TForm03.ViewClick(Sender: TObject);
begin
PrintWin1.BeginPrint;
PrintWin1.DrawWindow(2,poCenter,TabbedNotebook1);
PrintWin1.EndPrint;
end;
procedure TForm03.ExitClick(Sender: TObject);
begin
Close;
end;
procedure TForm03.BothClick(Sender: TObject);
var
Saved: string;
begin
Saved := TabbedNotebook1.ActivePage;
PrintWin1.Orientation := Portrait;
PrintWin1.BeginPrint;
TabbedNotebook1.ActivePage := 'Page 1';
PrintWin1.DrawWindow(2,poCenter,TabbedNotebook1);
TabbedNotebook1.ActivePage := 'Page 2';
PrintWin1.DrawWindow(5,poCenter,TabbedNotebook1);
PrintWin1.EndPrint;
TabbedNotebook1.ActivePage := Saved;
end;
procedure TForm03.BothBordersClick(Sender: TObject);
var
Saved: string;
begin
PrintWin1.FrameObjects := True;
Saved := TabbedNotebook1.ActivePage;
PrintWin1.BeginPrint;
{ Make visible, print and make invisible }
Memo2.Visible := True;
PrintWin1.DrawWindow(1,poCenter,Memo2);
Memo2.Visible := False;
{ Select Page to print }
TabbedNotebook1.ActivePage := 'Page 1';
PrintWin1.DrawWindow(2,poCenter,TabbedNotebook1);
{ Select new Page to print }
TabbedNotebook1.ActivePage := 'Page 2';
PrintWin1.DrawWindow(2+PrintWin1.GetControlHeight(TabbedNotebook1),poCenter,TabbedNotebook1);
PrintWin1.EndPrint;
{ Select Page that was active previously }
TabbedNotebook1.ActivePage := Saved;
PrintWin1.FrameObjects := False;
end;
end.